package cn.bestick.thirteenKiller.util;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * Created by bestick on 2016/1/17.
 */
public class PropertiesUtil {

    public static String getValue(String key) {
//        InputStream in = new PropertiesUtil().getClass().getResourceAsStream("resources/thirteenKiller.properties");
        Properties prop = new Properties();
        try {
            InputStream in = new BufferedInputStream(new FileInputStream("resources/thirteenKiller.properties"));
            prop.load(in);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return (String) prop.get(key);
    }
}
